package com.Shoping.service.impl;

import com.Shoping.dao.CommodityDao;
import com.Shoping.dao.impl.CommodityDaoImpl;
import com.Shoping.entity.Commodity;
import com.Shoping.service.CommodityService;

import java.sql.SQLException;
import java.util.List;

public class CommodityServiceImpl implements CommodityService {
    private CommodityDao commodityDao = new CommodityDaoImpl();
    @Override
    public List<Commodity> selectByCgId(Integer cgId) throws SQLException {
        return commodityDao.selectByCgId(cgId);
    }

    @Override
    public Commodity selectByCmId(Integer cmId) throws SQLException {
        return commodityDao.selectByCmId(cmId);
    }
}
